Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

489
Views
Vue.js How can I read the array values in [__ob__: Observer]

I need to create an array which will read 4 values ​​of type string and after that it will pass in a graph to create its columns.

This is my array bellow (poo: []) :

data() {
return {
  graphicData: {
    type: 'bar',
    data: {
      labels: [],
      datasets: [],
    },
    options: {
      responsive: true,
      lineTension: 1,
      scales: {
        yAxes: [
          {
            ticks: {
              beginAtZero: true,
              padding: 25,
            },
          },
        ],
      },
    },
  },
  average: 0,
  stepsGrade: [],
  poo: [], //This is my array

I pass the values ​​to it in this computed switch case

case 'P4':
      if (this.stepsGrade[0].step_grade > 92) {
        this.stepGradeIcon.push({ icon: 'mdi-emoticon-happy', color: 'green' });
        this.poo.push('green');;
      } else {
        this.stepGradeIcon.push({ icon: 'mdi-emoticon-sad', color: 'red' });
        this.poo.push('red');
      }

      if (this.stepsGrade[1].step_grade > 88) {
        this.stepGradeIcon.push({ icon: 'mdi-emoticon-happy', color: 'green' });
        this.poo.push('green');;
      } else {
        this.stepGradeIcon.push({ icon: 'mdi-emoticon-sad', color: 'red' });
        this.poo.push('red');
      }

      if (this.stepsGrade[2].step_grade > 84) {
        this.stepGradeIcon.push({ icon: 'mdi-emoticon-happy', color: 'green' });
        this.poo.push('green');;
      } else {
        this.stepGradeIcon.push({ icon: 'mdi-emoticon-sad', color: 'red' });
       this.poo.push('red');
      }

      if (this.stepsGrade[3].step_grade > 80) {
        this.stepGradeIcon.push({ icon: 'mdi-emoticon-happy', color: 'green' });
        this.poo.push('green');;
      } else {
        this.stepGradeIcon.push({ icon: 'mdi-emoticon-sad', color: 'red' });
        this.poo.push('red');
      }

      break;
  }

  return this.stepGradeIcon;

In my console log I have the data as follows

[__ob__: Observer]
0: "red"
1: "green"
2: "green"
3: "green"
length: 4
__ob__: Observer {value: Array(4), dep: Dep, vmCount: 0}
[[Prototype]]: Array

How can I read these 4 values ?

I try to use

var parsedobj = JSON.parse(JSON.stringify(this.poo));
    console.log(parsedobj);

Basically my array is only observated but never change and save the new value

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!